/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2023-12-20 23:06:55
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2023-12-24 12:56:49
 * @FilePath: /tuberculosis_screening_display_system/mock/global.service.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default [
  {
    url: '/api/area-schedule',
    method: 'get',
    response: ({ query }) => {
      return {
        code: 0,
        message: 'success',
        data: Array.from({ length: 10 }).map(() => ({
          id: '@integer(1, 100)',
          name: '@county',
          count: '@integer(10, 100)',
          total: 100, 
        })),
      }
    },
  },
  {
    url: '/api/region-schedule',
    method: 'get',
    response: ({ query }) => {
      return {
        code: 0,
        message: 'success',
        data: ['总人群', '学生','密切接触者', '教职工', '既往结核病患者','非重点人群', '糖尿病患者', '僧尼', '老年人'].map((name) => ({
          type: name,
          num: '@integer(0, 1000)',
          count: '@integer(0, 1000)',
        })),
      }
    },
  },
  {
    url: '/api/schedule',
    method: 'get',
    response: ({ query }) => {
      return {
        code: 0,
        message: 'success',
        data: ['总人群', '学生','密切接触者', '教职工', '既往结核病患者','非重点人群', '糖尿病患者', '僧尼', '老年人'].map((name) => ({
          type: name,
          num: '@integer(0, 1000)',
          count: '@integer(0, 1000)',
        })),
      }
    },
  },
  {
    url: '/api/flow',
    method: 'get',
    response: ({ query }) => {
      return {
        code: 0,
        message: 'success',
        data: ['PPD监测', 'DR监测', '分子生物学', '痰涂片', '痰培养','耐药'].map((name) => ({
          type: name,
          num: '@integer(0, 1000)',
          count: '@integer(0, 1000)',
        })),
      }
    },
  },
  {
    url: '/api/types',
    method: 'get',
    response: ({ query }) => {
      return {
        code: 0,
        message: 'success',
        data: Array.from({ length: 8 }).map((_,index) => ({
          type: ['密切接触者', '学生', '教职工', '僧尼', '老年人','糖尿病患者','既往结核病患者','非重点人群'][index],
          diagnose: '@integer(0, 1000)',
          confirmed: '@integer(0, 1000)',
          count: '@integer(0, 1000)',
        })),
      }
    },
  },
  {
    url: '/api/months',
    method: 'get',
    response: ({ query }) => {
      return {
        code: 0,
        message: 'success',
        data: Array.from({ length: 12 }).map((_,index) => ({
          month: `${index + 1}月`,
          diagnose: '@integer(0, 1000)',
          confirmed: '@integer(0, 1000)',
          count: '@integer(0, 1000)',
        })),
      }
    },
  },
]